<ul class="group" id="menu_group_main">
    <?php
    $object = new Menu($registry[$dbSystem]);

    $principalMenu = $object->getMenubyType('principal');

    if (isset($_SESSION["menu_active"])) {
        $optionMenuGET = isset($_GET["menu"]) ? $_GET["menu"] : "";
        $optionMenu = isset($_GET["menu"]) ? $_GET["menu"] : $_SESSION["menu_active"];
        foreach ($principalMenu as $value) {
            $menuActiveValueClass = "main";
            $detailMenuOptions = $value;
            if ($optionMenuGET == $detailMenuOptions["title"]) { //home primera vez 
                $_SESSION["active_option_menu"] = $detailMenuOptions["route"];
            }
            if ($optionMenu == $detailMenuOptions["title"]) { //home por la sesion
                $_SESSION["menu_active"] = $detailMenuOptions["title"];
                $menuActiveValueClass = "main current";
            }
            ?>
            <li class="<?php echo $detailMenuOptions["class_item"]; ?>" id="<?php echo $detailMenuOptions["pk_id_menu"]; ?>">
                <a href="<?php echo $detailMenuOptions["href"]; ?>" class="<?php echo $menuActiveValueClass; ?>">
                    <span class="outer">
                        <span class="<?php echo $detailMenuOptions["class_image"]; ?>"><?php echo $detailMenuOptions["title"]; ?></span>
                    </span>
                </a>
            </li>
            <?php
        }
    }
    ?>              
</ul>